<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlertFyNameToWorkOrderFuyouInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('work_order_fuyou_info', function (Blueprint $table) {
            $table->string('companyName', 50)->default('')->comment('企业名称');
            $table->string('mchName', 128)->default('')->comment('富友商户用户名');
            $table->string('mchPassword', 128)->default('')->comment('富友商户密码');
            $table->tinyInteger('secondaryBindingStatus')->default(0)->comment('富友一二级绑定邮件状态 0默认待认证 1成功 2失败');
            $table->tinyInteger('preSystemApplyStatus')->default(0)->comment('富友前置系统申请邮件状态 0默认待认证 1成功 2失败');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('work_order_fuyou_info', function (Blueprint $table) {
            $table->dropColumn('companyName');
            $table->dropColumn('mchName');
            $table->dropColumn('mchPassword');
            $table->dropColumn('secondaryBindingStatus');
            $table->dropColumn('preSystemApplyStatus');
        });
    }
}
